package Server.ServerMainFrame.ServerMainFrameModel;

import Server.ServerMainFrame.ServerMainFrameView.*;
import Server.ServerMainFrame.ServerMainFrameModel.*;
import Server.ServerMainFrame.ServerMainFrameController.*;

import Server.Login.Model.*;
import Server.Login.Controller.*;

import java.io.*;
import java.net.*;

import Core.Model.*;

public class ServerMainFrameModel 
{
    public void initialize(ServerLoginModel model, ServerLoginController controller)
    {
    	this.serverLoginModel = model;
    	this.serverLoginController = controller;
    	
        new InitializeClientAccount(this);
    	InitializeServerSocket thread = new InitializeServerSocket(this);
    	thread.start();
    }

    public void setViewAndController(ServerMainFrameView view,ServerMainFrameController controller)
    {
    	this.serverMainFrameView = view;
    	this.serverMainFrameController = controller;
    }
    
    public ServerMainFrameView getView()
    {
    	return this.serverMainFrameView;
    }
    public ServerMainFrameController getController()
    {
    	return this.serverMainFrameController;
    }
    
    public ServerSocket getServerSocket()
    {
    	return this.serverSocket;
    }
    
    private ServerLoginModel serverLoginModel;
    private ServerLoginController serverLoginController;
    
    private ServerMainFrameView serverMainFrameView;
    private ServerMainFrameController serverMainFrameController;
    
  
    private ServerSocket serverSocket;
    
    
    private final int MaxClientNumber = 1024;
    public int ClientNumber;
    public ClientUser clientUser[] = new ClientUser[MaxClientNumber];
    public String clientInfromationConfigureFile = new String("c:\\client_user_account.txt");
}
